package com.mofang.dao.remote;

import java.util.HashMap;

import com.mofang.utils.Constants;
import com.pactera.framework.exception.NetworkException;
import com.pactera.framework.exception.TimeoutException;
import com.pactera.framework.http.HttpResult;
import com.pactera.framework.util.Loger;

public class UserRemoteDao extends MoFangRemoteBaseDao {

	public HttpResult login(String userName, String password)
			throws TimeoutException, NetworkException {
		final String url = HOST + Constants.API_LOGINSERVLET;
		Loger.d("url:" + url);
		HashMap<String, String> hmParams = new HashMap<String, String>();
		hmParams.put("username", userName);
		hmParams.put("password", password);
		return intelPost(url, hmParams);
	}

	public HttpResult logout() throws TimeoutException, NetworkException {
		final String url = HOST + Constants.API_LOGOUTSERVLET;
		Loger.d("url:" + url);
		HashMap<String, String> hmParams = new HashMap<String, String>();
		return intelPost(url, hmParams);
	}

}
